package org.dh2580.netty.demo.bio;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

/**
 * @Author: hao.deng
 * @Date: 2019/3/20-上午11:08
 */
public class TimeClient {
    public static void main(String[] args) throws Exception {
        Socket socket = new Socket("127.0.0.1", 8080);

        BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
        PrintWriter out = new PrintWriter(socket.getOutputStream(), true);

        out.println("QUERY TIME ORDER");
        String resp = in.readLine();
        System.out.println("Now is " + resp);
    }
}
